<div>

    <h2>Ajouter un Pompier : </h2>

    <div>

        <div id="{msg_id}"> {msg_txt} </div>

        <br />

        <form action="./gestion_pompier.php?action={action}&display={display}" method="POST">

            <input type="hidden" id="pompier_id" name="pompier_id" value="{pompier_id}" />

            <table>
                <tr>
                    <td> Matricule : </td>
                    <td> <input type="text" id="matricule" name="matricule" /> </td>
                </tr>
                <tr>
                    <td> Personnes : </td>
                    <td>
                        <select name="personne_id">
                            <!-- BEGIN list_personne -->
                                <option id="value_list_personne_{list_personne.id}" value="{list_personne.id}" >{list_personne.personne_nom_prenom}</option>
                            <!-- END list_personne -->
                        </select>
                    </td>
                </tr>
                <tr>
                    <td> Grades : </td>
                    <td>
                        <select name="grade_id">
                            <!-- BEGIN list_grade -->
                                <option id="value_list_grade_{list_grade.id}" value="{list_grade.id}" > {list_grade.grade} </option>
                            <!-- END list_grade -->
                        </select>
                    </td>
                </tr>
                <tr>
                    <td> Type : </td>
                    <td>
                                <input type="radio" id="Professionnel" name="type" value="Professionnel" /> Professionnel
                                <input type="radio" id="Volontaire" name="type" value="Volontaire" /> Volontaire
                    </td>
                </tr>
                <tr>
                    <td> Mutualisation : </td>
                    <td>
                        <input type="radio" id="mutualisation_oui" name="mutualisation" value="1" /> Oui
                        <input type="radio" id="mutualisation_non" name="mutualisation" value="0" /> Non
                    </td>
                </tr>

                <tr> <td colspan=2> <center> <input type="submit" /> </center> </td> </tr>

            </table>

        </form>

    </div>

    

    <div>
        
    </div>

</div>

<script type="text/javascript">
    var matricule = "{matricule}";
    var value_list_personne = {value_list_personne};
    var value_list_grade = {value_list_grade};
    var type = "{type}";
    var mutualisation = "{mutualisation}";

    document.getElementById("matricule").setAttribute("value", matricule);

    if ( document.getElementById("value_list_personne_" + value_list_personne) != null )
    document.getElementById("value_list_personne_" + value_list_personne).setAttribute("selected", "true");

    if ( document.getElementById("value_list_grade_" + value_list_grade) != null )
    document.getElementById("value_list_grade_" + value_list_grade).setAttribute("selected", "true");

    document.getElementById(type).setAttribute("checked", "true");

    if ( mutualisation == 1 ) document.getElementById("mutualisation_oui").setAttribute("checked", "true");
    if ( mutualisation == 0 ) document.getElementById("mutualisation_non").setAttribute("checked", "true");
</script>